From d08dd0ac713846d51d52b8ee90a73a347c97dfb8 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Mon, 7 Feb 2005 15:48:40 +0000 Subject: [PATCH] bitkeeper revision 1.1159.223.75 (42078dd8VBcyJ0X9yF-bRHcBVUJ3Ww) As pointed out on the xen-devel list, the vm86 call was not very robust in Xen. It turned out to be due to a missing check in the pagefault handler, determining whether the pagefault came from userspace or from the kernel. Now the syscall-crash tool doesn't cause any "Oops" on the vm86 calls anymore. From: Stephan Diestelhorst Signed-off-by: ian.pratt@cl.cam.ac.uk --- linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c index b869fad317..9b5ba2b3d7 100644 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c @@ -228,7 +228,9 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code, /* Set the "privileged fault" bit to something sane. */ error_code &= 3; error_code |= (regs->xcs & 2) << 1; - + if (regs->eflags & X86_EFLAGS_VM) + error_code |= 4; + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, SIGSEGV) == NOTIFY_STOP) return; -- 2.30.2